var fs = require('fs');
var path = require("path");

var fileName = path.resolve(__dirname, './files/readFile.txt');
var fileName2 = path.resolve(__dirname, './files/writeFile.txt');

var readStream = fs.createReadStream(fileName);
var writeStream = fs.createWriteStream(fileName2);

readStream.pipe(writeStream);

readStream.on('end', function () {
    console.log('end');
})
